 /*定义一个人类*/  
 function Person(name,age)  
 {  
     this.name=name;  
     this.age=age;  
 }  
 /*定义一个学生类*/  
 function Student(name,age,grade)  
 {  
     Person.apply(this,[name,age]);  
     this.grade=grade;  
     this.info=function(){
        alert( "name:"+this.name+"\n"+"age:"+this.age+"\n"+"grade:"+this.grade) 
     }
 }  
 //创建一个对象  
 let student=new Student("zhangsan",21,"一年级");  
 student.info()
  
 //测试结果name:zhangsan age:21  grade:一年级  
 //学生类里面我没有给name和age属性赋值，存在这两个属性的值,这个就是apply的继承  